//    Copyright (C) 2013  <lugocreation@gmail.com>
//
//    This program is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
package org.jpgolay.me.print.options;

import java.awt.*;
import javax.swing.*;

public class GroupReferencesPanel extends JPanel {

    public GroupReferencesPanel() {
        pieceIdButton = null;
        pieceDateButton = null;
        salesPersonCheckBox = null;
        initialize();
    }

    private void initialize() {
        FlowLayout flowLayout2 = new FlowLayout();
        setLayout(flowLayout2);
        setSize(300, 94);
        setBorder(BorderFactory.createTitledBorder(null, "R\351f", 0, 0, new Font("Dialog", 1, 12), new Color(51, 51, 51)));
        flowLayout2.setHgap(2);
        flowLayout2.setVgap(2);
        add(getPieceIdButton(), null);
        add(getPieceDateButton(), null);
        add(getSalesPersonCheckBox(), null);
    }

    private JButton getPieceIdButton() {
        if (pieceIdButton == null) {
            pieceIdButton = new JButton();
            pieceIdButton.setPreferredSize(new Dimension(284, 20));
            pieceIdButton.setHorizontalAlignment(2);
            pieceIdButton.setText("Numero de la pi\350ce");
            pieceIdButton.setBorderPainted(false);
            pieceIdButton.setContentAreaFilled(false);
            pieceIdButton.setFocusPainted(false);
        }
        return pieceIdButton;
    }

    private JButton getPieceDateButton() {
        if (pieceDateButton == null) {
            pieceDateButton = new JButton();
            pieceDateButton.setPreferredSize(new Dimension(284, 20));
            pieceDateButton.setHorizontalAlignment(2);
            pieceDateButton.setText("Date");
            pieceDateButton.setBorderPainted(false);
            pieceDateButton.setContentAreaFilled(false);
            pieceDateButton.setFocusPainted(false);
        }
        return pieceDateButton;
    }

    private JCheckBox getSalesPersonCheckBox() {
        if (salesPersonCheckBox == null) {
            salesPersonCheckBox = new JCheckBox();
            salesPersonCheckBox.setPreferredSize(new Dimension(284, 20));
            salesPersonCheckBox.setText("Commercial");
            salesPersonCheckBox.setFocusPainted(false);
            salesPersonCheckBox.setHorizontalTextPosition(11);
        }
        return salesPersonCheckBox;
    }

    public JButton getPieceId() {
        return getPieceIdButton();
    }

    public JButton getPieceDate() {
        return getPieceDateButton();
    }

    public JCheckBox getSalesPerson() {
        return getSalesPersonCheckBox();
    }
    private JButton pieceIdButton;
    private JButton pieceDateButton;
    private JCheckBox salesPersonCheckBox;
}
